class com.spikything.utils.Preloader extends MovieClip {

	var total:Number;

	function Preloader () {}

	public function onLoad () {
		_parent.stop();
		total = _parent.getBytesTotal();
		onEnterFrame();
	}
	
	public function onEnterFrame () {
		if (_parent._framesloaded == _parent._totalframes) _parent.nextFrame();
		_xscale = 100*(_parent.getBytesLoaded()/total);
	}
}